<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>循环遍历</title>
</head>
<body>
<div>
    <table border="1">
        <caption>国产优秀作品</caption>
        <tr>
            <th>编号</th>
            <th>小说名</th>
            <th>作者</th>
            <th>价格</th>
        </tr>
        <tr v-for="(story,i) in array">
            <td>{{i+1}}</td>
            <td>{{story.title}}</td>
            <td>{{story.name}}</td>
            <td>{{story.price}}</td>
        </tr>
    </table>
    <h1 v-for="story in array">{{story.title}}
    ,{{story.name}},{{story.price}}</h1>
</div>
<script src="../js/vue.js"></script>
<script>
    let v=new Vue({
        el:"div",
        data:{
            array:[{name:"辰东",title:"遮天",price:5000},
                {name:"辰东",title:"完美世界",price:5000},
                {name:"辰东",title:"圣墟",price:5000},
                {name:"齐佩甲",title:"超神机械师",price:5000},
                {name:"火星引力",title:"网游之天谴修罗",price:5000},],
        }
    })
</script>
</body>
</html>